﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpPickInterface.h"
#include "IObject.h"

namespace gcmp
{
    class IModelView;
    class ElementId;
    class IElement;

    /// \brief UI操纵器策略接口
    class GCMP_PICK_INTERFACE_EXPORT IElementUiManipulateStrategy : public IObject
    {
        DEFINE_CAST_DERIVED(gcmp::IElementUiManipulateStrategy, gcmp::IObject);
    public:
        /// \brief 析构函数
        virtual ~IElementUiManipulateStrategy() {}

        /// \brief 创建辅助对象
        /// \param pModelView 当前视图，创建辅助对象时若不需要视图信息可传入空
        /// \param pElement 当前对象
        /// \return 辅助元素ID的vector
        virtual std::vector<ElementId> CreateAuxiliaryElements(gcmp::IModelView* pModelView, const IElement* pElement) const = 0;

        /// \brief 对象在被链接并且可被编辑时，是否产生夹点对象。默认不产生
        /// \param pElement 需要判定的对象
        /// \return 产生-true;不产生-false
        virtual bool ShouldGenerateElementShapeHandleWhenIsLinkedAndEditable(const IElement* pElement) const
        {
            return false;
        }
    };
}
